//
//  YsCloudFileDownloadButton.m
//  YsCloudFileManageSDK
//
//  Created by 宋宏康 on 2020/3/3.
//

#import "YsCloudFileDownloadButton.h"
#import "YsCloudFileManageSDKHelper.h"
#import <YYKit/YYKit.h>

@interface YsCloudFileDownloadButton()
//@property(nonatomic,retain) PKStopDownloadButton *downloadBtn;
@end

@implementation YsCloudFileDownloadButton

- (instancetype)init
{
    self = [super init];
    if (self) {
        [self initSubviews];
    }
    return self;
}

- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        [self initSubviews];
    }
    return self;
}

- (void)initSubviews
{
    self.emptyLineWidth = 2.0;
    self.filledLineWidth = 2.0;
    self.progress = 0.0f;
    self.radius = 24.f;
    PKCircleView *emptyLineCircleView =  (PKCircleView *)[self valueForKey:@"emptyLineCircleView"];
    emptyLineCircleView.tintColor = [UIColor colorWithHexString:@"E6E6E6"];
    PKCircleView *filledLineCircleView =  (PKCircleView *)[self valueForKey:@"filledLineCircleView"];
    filledLineCircleView.tintColor = [UIColor colorWithHexString:@"367bd6"];
    [self.stopButton setImage:[YsCloudFileManageSDKHelper imageWithName:@"transmission_xiazai"] forState:UIControlStateNormal];
    [self.stopButton setImage:[YsCloudFileManageSDKHelper imageWithName:@"transmission_zanting"] forState:UIControlStateSelected];
    self.userInteractionEnabled = YES;
//    self.stopButton.selected = YES;
    
    //        self.downloadBtn.emptyline
    //       [self.downloadBtn.stopButton addTarget:self action:@selector(downClick:) forControlEvents:UIControlEventTouchUpInside];
    //       self.downloadBtn.hidden = YES;
}

@end
